package router

import (
	"github.com/gin-gonic/gin"
	"ws-demo/service"
)

/**
 * @Description
 * @Author huran
 * @Date
 * @Param
 * @return
 **/

func NewRouter() *gin.Engine {
	//	config.Init()
	r := gin.Default()
	r.Use(gin.Recovery(), gin.Logger())
	v1 := r.Group("/")
	{
		v1.GET("ping", func(context *gin.Context) {
			context.JSON(200, "SUCCESS")
		})
		//v1.POST("/user/register", api.UserRegister)
		v1.GET("ws", service.WsHandler)
	}
	return r
}
